<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">











<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>NPanday - Debugging the Visual Studio Add-in</title>
    <style type="text/css" media="all">
      @import url("../css/maven-base.css");
      @import url("../css/maven-theme.css");
      @import url("../css/site.css");
    </style>
    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
          </head>
  <body class="composite">
    <div id="banner">
                  <a href="" id="bannerLeft">
    
                                            <img src=".././images/NPanday.png" alt="" />
    
            </a>
                        <a href="http://www.codeplex.com/" id="bannerRight">
    
                                            <img src=".././images/logo-home.png" alt="" />
    
            </a>
            <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="breadcrumbs">
          
  

  
    
            
  
    
            <div class="xleft">
          
                <a href="http://npanday.codeplex.com/" class="externalLink">NPanday Home</a>
                &gt;
      
                <a href="../">NPanday 1.2</a>
                  </div>
            <div class="xright">      
  

  
    
            
  
    
             Last Published: 22 Jun 2010
              &nbsp;| Version: 1.2
            </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="leftColumn">
      <div id="navcolumn">
           
  

  
    
            
  
    
                   <h5>General Info</h5>
            <ul>
              
    <li class="none">
                    <a href="../index.html">NPanday Overview</a>
          </li>
              
    <li class="none">
                    <a href="../release-notes.html">NPanday Release Notes</a>
          </li>
              
    <li class="none">
                    <a href="../faqs.html">NPanday FAQs</a>
          </li>
              
    <li class="none">
                    <a href="../faqs.html">NPanday Features</a>
          </li>
              
    <li class="none">
                    <a href="../npanday.pdf">Documentation PDF</a>
          </li>
          </ul>
              <h5>User's Guide</h5>
            <ul>
              
    <li class="none">
                    <a href=".././guide/index.html">Introduction</a>
          </li>
              
    <li class="none">
                    <a href=".././guide/installation/index.html">Installation</a>
          </li>
              
    <li class="none">
                    <a href=".././guide/vs/index.html">Visual Studio Add-in</a>
          </li>
              
    <li class="none">
                    <a href=".././guide/maven/index.html">Maven Command Line</a>
          </li>
              
    <li class="none">
                    <a href=".././guide/devinfra/index.html">Maven Development Infrastructure</a>
          </li>
              
    <li class="none">
                    <a href="../plugins/index.html">NPanday Plugins</a>
          </li>
          </ul>
              <h5>Contributing</h5>
            <ul>
              
    <li class="none">
                    <a href=".././developers/index.html">Developer's Guide</a>
          </li>
              
    <li class="none">
                    <a href=".././issue-tracking.html">Issue Tracking</a>
          </li>
              
    <li class="none">
                    <a href=".././mail-lists.html">Mailing Lists</a>
          </li>
          </ul>
              <h5>Project Documentation</h5>
            <ul>
              
                
              
      
            
      
            
      
            
      
            
      
            
      
            
      
              
        <li class="collapsed">
                    <a href="../project-info.html">Project Information</a>
                </li>
          </ul>
              <h5>Resources</h5>
            <ul>
              
    <li class="none">
                    <a href="http://maven.apache.org/" class="externalLink">Apache Maven</a>
          </li>
              
    <li class="none">
                    <a href="http://npanday.codeplex.com/" class="externalLink">NPanday on CodePlex</a>
          </li>
          </ul>
                                           <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
            <img alt="Built by Maven" src="../images/logos/maven-feather.png"></img>
          </a>
                       
  

  
    
            
  
    
        </div>
    </div>
    <div id="bodyColumn">
      <div id="contentBox">
        <div class="section"><h2>Debugging the Visual Studio Add-in</h2>
<p>If you are looking to contribute to the code in the Add-in, you will find it helpful at times to be able to step through it in the Visual Studio debugger. The following steps show how to do so.</p>
<ol type="1"><li>Check out the source code for NPanday if you haven't already. More information on how to build it is available in <a href="./building.html"> Building NPanday</a>.</li>
<li>Open solution file: <tt>assemblies\NPanday\NPanday.sln</tt>. You may need to choose 'Load project normally' in a warning dialog. The solution is for Visual Studio 2005 - if you are using a more recent version it may ask you to upgrade the project as well.</li>
<li>Build the whole solution using the normal Visual Studio build solution command.</li>
<li>Open this file using a text editor (notepad will do): <tt>My Documents\Visual Studio 2005\Addins\NPanday.VisualStudio.AddIn</tt>. This should be the file for the version of Visual Studio you intend to debug it in, so change 2005 to 2008 if desired (it need not be the same as the one you have the main solution open in).</li>
<li>Change the value of the <tt>&lt;Extensibility&gt;&lt;AddIn&gt;&lt;Assembly&gt;</tt> to the following file within your checkout: <tt>assemblies\NPanday.VisualStudio.Addin\target\NPanday.VisualStudio.Addin.dll</tt>. You must use the full path, for example: <tt>c:\Documents and Settings[username]\checkouts\npanday\assemblies\...</tt></li>
<li>Back in Visual Studio, from the NPanday solution, right click on the <tt>NPanday.VisualStudio.Addin</tt> project. Set it to be the <i>Start up project</i> of the solution.</li>
<li>Right click on <tt>NPanday.VisualStudio.Addin</tt> again and select <i>Properties</i></li>
<li>Go to the Debug tab and select <i>Start External Program</i> in the <i>Action</i> section. Locate the <tt>devenv.exe</tt> of the version of Visual Studio that you want to debug. This is likely to be either <tt>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe</tt> (Visual Studio 2008) or <tt>C:\Program Files\Microsoft Visual Studio 8.0\Common7\IDE\devenv.exe</tt> (Visual Studio 2005)</li>
<li>You can now set any breakpoint on the project and press the &quot;Run&quot; button to open a new instance of Visual Studio with the current Add-in code loaded. <tt>Connect.cs</tt> is the main class of the Add-in and is the place to look for code to set breakpoints in to start with.</li>
</ol>
</div>

      </div>
    </div>
    <div class="clear">
      <hr/>
    </div>
    <div id="footer">
      <div class="xright">&#169;  
          2010
    
          NPanday
          
  

  
    
            
  
    
  </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
  </body>
</html>
